Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.pvzChannelWx7 = undefined;
var $2pvzChannelWx = require("pvzChannelWx");
var $2kc = require("kc");
exports.pvzChannelWx7 = /* */function (_n$pvzChannelWx6) {
  babel_inherits(_class18, _n$pvzChannelWx6);
  var _super120 = babel_createSuper(_class18);
  function _class18() {
    var _this284;
    babel_classCallCheck(this, _class18);
    _this284 = _super120.apply(this, arguments);
    _this284.channel = "wx7";
    _this284.paraMap = new Map([["bannerAd", "adunit-ef8abe442d17f63b"], ["videoAd", "adunit-de6b9d7c6bdbe2d3"], ["nativeIcon", "adunit-1ad57221cd7d31bd"], ["nativeBanner", "adunit-f163e3b9d0d6baec"], ["nativeArr1", "adunit-52d8acbce2b87c61"], ["nativeArr2", "adunit-6892b564106f5529"], ["gid", "63f46756e6d3ab07ce9bf9f9"], ["bid", "64673b5a05ba390c5ac84ec2"], ["ctrlId", "6474130205ba390c5ac968ab"]]);
    _this284.ruanzhu = "\n著作权人：南京天豆互动网络科技有限公司 软著登记号：2022SR0778973";
    return _this284;
  }
  babel_createClass(_class18, [{
    key: "init",
    value: function init() {
      var _this285 = this;
      babel_get(babel_getPrototypeOf(_class18.prototype), "init", this).call(this);
      var e = this.channelObj;
      if (!e) {
        return;
      }
      e.onShow(function () {
        cc.game.resume();
        if (_this285.isShare) {
          if (_this285.isShareSuc()) {
            _this285.shareSucBack && _this285.shareSucBack(), e.showToast({
              title: "分享成功!"
            });
          } else {
            e.showToast({
              title: "分享失败"
            }), _this285.shareFailBack && _this285.shareFailBack();
          }
          _this285.isShare = false;
        }
      });
      e.onHide(function () {
        cc.game.pause();
        _this285.isShare && (_this285.shareTime = new Date().getTime());
      });
      e.showShareMenu({
        withShareTicket: true,
        menus: ["shareAppMessage", "shareTimeline"]
      });
      e.onShareAppMessage(function () {
        return {};
      });
      var t = this;
      t.cacheBanner();
      setInterval(function () {
        t.cacheBanner();
      }, 5e3);
      this.getPara("gid") && $2kc.default.htInit(this.getPara("gid"));
    }
  }]);
  return _class18;
}($2pvzChannelWx.pvzChannelWx);